
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import javax.swing.JFrame;
import javax.swing.JLabel;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Emil Yosifov (eey9)
 */
public class Frame extends JFrame{
    private JLabel juLabel;

    public Frame(){
        juLabel=new JLabel("No key is pressed");
        this.add(juLabel);
        this.addKeyListener(new KeyListen(this));
        this.setSize(300,300);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.setVisible(true);
    }

    public void setText(String a){
        juLabel.setText(a);
        repaint();
    }
}
